
# for i in range(10,21):
# #     print(i)
# result = 0
# for i in range(1,101,2):
#     result += i
# # print(f'result={result}')
# num ='H-e--l---l--oP---y--t-hon'
# for i in num:
#     if i == 'n':
#         break
#     print(num.count(i))
# # num = ['爱', '我', '中', '华']
# for i in:
# # # #     print(i)
# info = '少小离家老大回,乡音无改鬓毛衰,儿童相见不相识,笑问客从何处来'
# # print(info.replace(',','\n'))
# info1 = print(info.split(','))
# for i in info.split(','):
#     print(i)
# # print(info.replace(',','\n'))
# info1 = info.split(',')
# for i in info1:
#     print(i)
# info = "itheima" # 遍历取出字符串中的元素
# for i in info:
#     print(i)
# # 判断是否是字母e if i == "e": break # 取出元素 print(i)
# info = ["刘备", "男", "双股剑"]
# # for i in info:
# #     print(i)
# import random
# cp = random.randint(1,6)
# # i = 1
# info = []
# info.insert(0,'张飞''小乔''李白''关羽''刘备')
# print(info)
# import random
# # cp =
# person_info = {"name": "刘备", "age": "45", "title": "蜀国君主"},
# person_info = {"name": "张飞", "age": "40", "title": "右将军"},
# person_info = {"name": "关羽", "age": "43", "title": "前将军"}]
# print(person_info)




# 1 == '张飞' and 2 =='小乔' and 3 == '李白' and 4 == '关羽'and 5 == '刘备'
# while i == :
#     print(i)
# #     i += 1
# a = [1,3,5,7,9]
# b = [2,4,6,8,0]
# a.extend(b)
# a.sort()
# print(a)
# info = {}
# info['name']= '张三'
# info['age']= '18'
# info['sex']= '男'
# info['name']='李四'
# info['age']= '20'
# info['sex']= '男'
# print(info)
# info1 ={"姓名":input('姓名:'),"年龄":input('年龄:'),"性别":input('性别:')}
# info2 ={"姓名":input('姓名:'),"年龄":input('年龄:'),"性别":input('性别:')}
# info3 ={"姓名":input('姓名:'),"年龄":input('年龄:'),"性别":input('性别:')}
# info4 = [info1,info2,info3]
# # for i in info4:
# # #     print(i)
# info = {"id": 10, "name": "周瑜", "age": 30}
# info['sex']= '男'
# info['age']= '25'
# print(info)
# # for i in info.items():
# #     print(i)
# num = ['爱', '我', '中', '华']
# for i in num:
# #     print(i,end='')
# num = 'H-e--l---l--oP---y--t-hon'
# i = 0
# for e in num:
#     if e == '-':
#         i += 1
# print(i)
#
# info = []
# info.insert(0,'张飞''小乔''李白''关羽''刘备')
# print(info)
# import random
# random.randint(1,5)
# num = list()
# print(type(num))
# info = []
# for i in range(0,5):
#     name = input('输入一个姓名:')
#     info.append(name)
# print(info)
# #输入,input.先定义一个空列表,然后循环三次,结果定义到字典里,然后把字典定义到列表,最后打印
info = []
for i in range(3):
    name = input('输入姓名')
    age = int(input('输入性别'))
    sex = input('输入性别')
    dirt = {'name':name,'age':age,'sex':sex}
info.append(dirt)
print(info)
# for i in info:
#     print(i)
person_info = [{"name": "刘备", "age": "45", "title": "蜀国君主"},
{"name": "张飞", "age": "40", "title": "右将军"},
{"name": "关羽", "age": "43", "title": "前将军"}]
find_name = input('请输入要查找的名字')
for i in person_info:
    if find_name == i.get('name'):
        print(f'姓名:{i.get("name")},年龄:{i.get("age")},性别:{i.get("sex")}
    break